/*
 * MyGWT User Extensions
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package net.mygwt.ux.client.widgets;

/**
 * This is a replacement for GWT PasswordTextBox. Unlike the very limited
 * capacities provided by GWT implementation, this one has all the TextBox
 * possibilities. It has all the methods of GWT PasswordTextBox but does not
 * derivate from it.
 * 
 * @author Damien Ferrand
 */
public class PasswordTextBox extends TextBox {

    /**
     * Create a password TextBox without additional style, no maximum length
     * and a default display size.
     */
    public PasswordTextBox() {
        this(0, 0);
    }

    /**
     * Creates a password TextBox with the given maximum length (which is also
     * set for the display size) and the given style.
     * 
     * @param size
     *            the maximum length and display size (0 for no maximum length
     *            and default display size)
     * @param styleParm
     *            the style to apply to the password text box (PASSWORD is
     *            automatically added)
     */
    public PasswordTextBox(int size, int styleParm) {
        super(size | PASSWORD, styleParm);
    }

}
